﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Script.Serialization;

public partial class web_Fee : System.Web.UI.Page
{
    FeeService feeService = new FeeService();
    FeeBean fee = new FeeBean();
    protected void Page_Load(object sender, EventArgs e)
    {
        string methodName = Request["method"];
        if (string.IsNullOrEmpty(methodName)) return;
        Type type = this.GetType();
        MethodInfo method = type.GetMethod(methodName);
        method.Invoke(this, null);
    }

    public void findById()
    {
        fee.Id = Convert.ToInt64(Request["id"]);
        FeeBean feeReturn = feeService.findById(fee);
        string json = JSON.Encode(feeReturn);
        Response.Write(json);
    }

    public void findAll()
    {
        List<FeeBean> list = feeService.findAll();
        string json = JSON.Encode(list);
        Response.Write(json);
    }
}